package com.samsungmobile.common.channel;

// JAVA API
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

abstract public class ServletRun {
 
    //protected TapsHttpServletRequest req  = null;
    protected HttpServletRequest req;
    protected HttpServletResponse res = null; 
    protected HttpSession session     = null; 


    /**
     * @param req
     * @param res
     */
    public void execute(HttpServletRequest req, HttpServletResponse res) {        

        //this.req = new TapsHttpServletRequest(request);
        this.req = req;
        this.res = res; 
        this.session = req.getSession(); 
            
        try {
            init();
            process();
        } catch( Exception e) {
            e.printStackTrace();
        }

    }

    protected abstract void init() throws Exception;
   
    protected abstract void process() throws Exception;

}
